package frontend.components.menu;

import backend.model.admin.Department;
import frontend.pages.admin.activity.ActivityManagingPage;
import frontend.pages.admin.department.DepartmentManagingPage;
import frontend.pages.admin.employee.EmployeeManagingPage;
import frontend.pages.admin.foreignmanager.ForeignManagerManagingPage;
import frontend.pages.admin.legalholiday.LegalHolidayManagingPage;
import frontend.pages.admin.occupation.OccupationManagingPage;
import frontend.pages.admin.project.ProjectManagingPage;
import frontend.pages.admin.sfi.SfiManagingPage;
import frontend.pages.admin.shift.ShiftManagingPage;
import frontend.pages.admin.team.TeamManagingPage;
import frontend.pages.admin.workdetail.WorkDetailManagingPage;
import frontend.pages.admin.workplace.WorkplaceManagingPage;
import frontend.pages.reports.commuter.CommutersReportPage;
import frontend.pages.reports.hoursperprojectsfi.HoursPerProjectSfiReportPage;
import frontend.pages.reports.manning.ManningReportPage;
import frontend.pages.settings.personalprofile.PersonalProfilePage;
import frontend.pages.reports.entirework.EntireWorkReportPage;
import frontend.pages.reports.workperemployee.WorkPerEmployeeReportPage;
import frontend.pages.reports.workperteam.WorkPerTeamReportPage;
import frontend.pages.settings.resetpassword.ResetPasswordPage;
import frontend.pages.reports.charismasynch.CharismaSynchronizationPage;
import frontend.pages.worklog.closemonth.MonthStatePage;
import frontend.pages.worklog.daily.DailyWorkLogPage;
import frontend.pages.worklog.monthly.MonthlyWorkLogPage;
import frontend.pages.worklog.morning.MorningWorkLogPage;

import java.util.Arrays;
import java.util.List;

public class MenuDefinition {

    public static List<MenuItem> createMenuDefinition() {
        // Work Log
        LinkItem dailyWorkLog = new LinkItem("menu.bookTime.items.dailyWorkLogPage", DailyWorkLogPage.class);
        LinkItem monthlyWorkLog = new LinkItem("menu.bookTime.items.monthlyWorkLogPage", MonthlyWorkLogPage.class);
        LinkItem closeMonth = new LinkItem("menu.bookTime.items.monthStatePage", MonthStatePage.class);
        LinkItem morningWorkLog = new LinkItem("menu.bookTime.items.morningWorkLogPage", MorningWorkLogPage.class);
        MenuItem bookTimeMenu = new DropDownMenu("menu.bookTime.title",
                Arrays.asList(dailyWorkLog, monthlyWorkLog, morningWorkLog, closeMonth));

        // Reports
        LinkItem entireWork = new LinkItem("menu.reports.items.entireWork", EntireWorkReportPage.class);
        LinkItem workLogPerEmployee = new LinkItem("menu.reports.items.workLogPerEmployee", WorkPerEmployeeReportPage.class);
        LinkItem workLogPerTeam = new LinkItem("menu.reports.items.workLogPerTeam", WorkPerTeamReportPage.class);
        LinkItem charismaSynchronization = new LinkItem("menu.reports.items.charismaSyncPage", CharismaSynchronizationPage.class);
        // LinkItem manningReport = new LinkItem("menu.reports.items.manningReport", ManningReportPage.class);
        LinkItem commutersReport = new LinkItem("menu.reports.items.commuters", CommutersReportPage.class);
        LinkItem hoursPerProjectSfi = new LinkItem("menu.reports.items.hoursPerProjectSfi", HoursPerProjectSfiReportPage.class);
        MenuItem reportsMenu = new DropDownMenu("menu.reports.title",
                Arrays.asList(entireWork, workLogPerEmployee, workLogPerTeam, charismaSynchronization, commutersReport, hoursPerProjectSfi));

        // Admin
        LinkItem employees = new LinkItem("menu.admin.items.employees", EmployeeManagingPage.class);
        LinkItem teams = new LinkItem("menu.admin.items.teams", TeamManagingPage.class);
        LinkItem projects = new LinkItem("menu.admin.items.projects", ProjectManagingPage.class);
        LinkItem sfi = new LinkItem("menu.admin.items.sfi", SfiManagingPage.class);
        LinkItem activity = new LinkItem("menu.admin.items.activities", ActivityManagingPage.class);
        LinkItem department = new LinkItem("menu.admin.items.departments", DepartmentManagingPage.class);
        LinkItem workplace = new LinkItem("menu.admin.items.workplace", WorkplaceManagingPage.class);
        LinkItem workDetails = new LinkItem("menu.admin.items.workDetails", WorkDetailManagingPage.class);
        LinkItem occupations = new LinkItem("menu.admin.items.occupations", OccupationManagingPage.class);
        LinkItem shifts = new LinkItem("menu.admin.items.shifts", ShiftManagingPage.class);
        LinkItem legalHolidays = new LinkItem("menu.admin.items.legalHolidays", LegalHolidayManagingPage.class);
        LinkItem foreignManagers = new LinkItem("menu.admin.items.foreignManagers", ForeignManagerManagingPage.class);
        MenuItem adminMenu = new DropDownMenu("menu.admin.title", Arrays.asList(employees, teams, projects, foreignManagers,
                sfi, activity, department, workplace, workDetails, occupations, shifts, legalHolidays));

        // My Profile
        LinkItem personalProfile = new LinkItem("menu.personalProfile.title", PersonalProfilePage.class);
        LinkItem resetPassword = new LinkItem("menu.resetPassword.title", ResetPasswordPage.class);
        MenuItem settingsMenu = new DropDownMenu("menu.settings.title", Arrays.asList(personalProfile, resetPassword));

        return Arrays.asList(bookTimeMenu, reportsMenu, adminMenu, settingsMenu);
    }
}